package com.jungle.mvvm.net;

import android.util.Log;

import java.io.IOException;

import okhttp3.Interceptor;
import okhttp3.Response;

/**
 * 详细说明
 *
 * @author Daniel
 * @version V1.0
 * @date 2020/12/25 11:34
 */
public class ResponseInterceptor implements Interceptor {
    private final String TAG = "ResponseInterceptor";

    @Override
    public Response intercept(Chain chain) throws IOException {
        long requestTime = System.currentTimeMillis();
        Response response = chain.proceed(chain.request());
        Log.d(TAG, (System.currentTimeMillis() - requestTime) + "");
        return response;
    }
}
